The present invention relates to an image processing device and, more particularly, to an image processing device arranged to effectively extract the features of small areas of an image.
When the surface of an article is inspected for stains, flaws or defects, there is often performed such an image processing as picks up the surface of the article by a television camera and measures the density or the number of defects in a region of a predetermined area of the image. In such a conventional image processing method, in order to shorten the processing time, the entire region of the image is fixedly divided into a plurality of non-overlapping regions, and the image processing is performed for each divided region. The purpose of this image processing is to inspect whether the number of defects or the density in the predetermined area exceeds a predetermined value or threshold value or not. In the case that the image is fixedly divided into a plurality of small regions and the number of defects or the density of each small region is measured, the following problems will arise.
As shown in FIG. 1, it is assumed that an image 1 has (M.times.N) picture elements and is divided into small regions 2 each of (m.times.n) picture elements. It is also assumed that the image processing is performed to inspect the number of defects within the area of each divided region 2. For instance, it is also assumed that, a small region which contains more than two defects is rejected on the basis of an inspection criterion. On these assumptions, when defects 3 which are irregularly distributed are inspected, the situations shown in FIGS. 2A and 2B might occur. Namely, when the image 1 is fixedly divided into a plurality of small regions 2 without overlapping each others, there might occur a case where three defects 3a, 3b and 3c which are distributed within the area of small region 2 are contained in divided region 2 as shown in FIG. 2A, and a case where defects 3a, 3b and 3c are not contained in region 2 as shown in FIG. 2B. In these cases, the small region 2 of FIG. 2A is decided as being rejected, while the small region 2 of FIG. 2B is decided as being allowable. In other words, the presence of defects 3a, 3b and 3c contained in the area of a small region is ignored, thereby causing an inspection result to be in error. In order to overcome this problem in conventional image processing method, it is necessary to divide the entire region into a plurality of small regions overlapping each other in spite of consuming a lot of processing time.